package com.bjhrsoft.controller;

import com.bjhrsoft.service.TestService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * Created with IDEA
 *
 * @author:LiPeng
 * @Date:2019/1/16
 * @Time:16:11
 **/
@RestController
@RequestMapping("/stu")
public class Controller {

    @Autowired
    private TestService testService;
    @GetMapping(value = "/{name}")
    public String getName(@PathVariable String name){
        String name1 =testService.getData(name) ;
        return "hello！！"+name1;
    }
}
